<template>
    <div>
        <h1>小头爸爸</h1>
        <BigHeader :money="money" :list="list"></BigHeader>
        <button @click="change">当传递给子元素的数据不要在子组件中更改 在父元素中改动</button>
    </div>
</template>

<script>
import BigHeader from './BigHeader.vue';
export default {
    name: '',
    data() {
        return {
            money: '100W',
            list:[{name:'tom',age:18},{name:'jack',age:10},{name:'rose',age:15}]
            /*
            基本数据类型：string number null boolean undefined
            引用数据类型：object array function
            */
        };
    },
    components: {
        BigHeader
    },
    methods:{
        change(){
            this.money = '200W'
        }
    }
}
</script>

<style scoped>

</style>